// Copyright(c) Sonosemi Medical Ltd. Embedded Software Team.
// Author: Zhang Yisong(zhangyisong@sonosemi.com)

#pragma once
#include <stddef.h>
#include <tuple>
namespace active {

namespace internal {
#if 0
template <typename... Ts> struct Active;
template <typename T> struct is_active_config : public std::false_type {};

template <typename... Ts>
struct is_active_config<internal::Active<Ts...>> : public std::true_type {};

template <typename... Ts>
struct is_active_config<std::tuple<internal::Active<Ts...>>>
    : public std::true_type {};

template <typename T> struct is_active_tuple : public std::false_type {};

template <typename... Ts>
struct is_active_tuple<std::tuple<Ts...>> : public std::true_type {};
template <typename... Ts> struct Policy {};
template <typename T> struct is_policy : public std::false_type {};

template <typename... Ts>
struct is_policy<Policy<Ts...>> : public std::true_type {};

template <typename T> struct is_task_config : public std::false_type {};

template <size_t size = 0, size_t pio = 0> struct TaskConfig {
  static constexpr auto kQueueSize = size;
  static constexpr auto kPriority = pio;
};

template <size_t size, size_t prio>
struct is_task_config<TaskConfig<size, prio>> : public std::true_type {};
#endif
} // namespace internal

namespace concepts {

#if 0
template <typename T>
concept ActiveConfiguable =
    std::disjunction<internal::is_active_config<T>,
                     internal::is_active_tuple<T>>::value;
template <typename TSm>
concept SmConfigurable = requires(TSm sm) { sm.operator()(); };

template <typename T>
concept Policable = requires(T t) { internal::is_policy<T>::value; };

template <typename T>
concept PolicyConfigurable =
    requires(T t) { internal::is_policy<typename T::Type>::value; };

template <typename T>
concept TaskConfigable = requires(T t) { internal::is_task_config<T>::value; };

#endif
} // namespace concepts

} // namespace active
